package com.zwl.smartplatform.controller;

import com.zwl.smartplatform.dto.R;
import com.zwl.smartplatform.pojo.Scene;
import com.zwl.smartplatform.service.SceneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/scene")
public class SceneController {

    private SceneService sceneService;

    @Autowired
    public void setSceneService(SceneService sceneService) {
        this.sceneService = sceneService;
    }

    @PostMapping("/scene")
    public R addScene(@RequestBody Scene scene){
   sceneService.addScene(scene);
   return R.setOK();
    }
}
